<template>
	<van-field v-if="!item.hide" v-model="formData[item.name]" v-bind="bindOptions" @click="handleClick(item)"
		:label-class="item.rules && item.rules[0].required ? 'required' : ''">
		<template #lable>
			<view class="">
				{{item.label}}
			</view>
		</template>
	</van-field>
</template>

<script>
	import base from "../base.js"
	// import DhStatus from "./dh-status.vue"
	export default {
		name: 'dh-field',
		mixins: [base],
		data() {
			return {
				text: ""
			}
		}
	}
</script>

<style lang="scss" scoped>
	.van-cell {
		padding: 15px 12px;

		&.column {
			flex-direction: column;
			padding: 10px 12px;

			// /deep/ .vant-field__label {
			::v-deep .van-field__label {
				width: 100%;

				&.required {
					&::after {
						position: relative;
						top: 2px;
						margin-left: 2px;
						color: #f02737;
						content: "*";
					}
				}
			}
		}
	}
</style>